package Others.DesignPattern.FactoryPattern.Original;

import Others.DesignPattern.FactoryPattern.Original.Object.Undergraduate;

public class main {
    public static void main(String[] args) {

        Undergraduate undergraduate = new Undergraduate();
        undergraduate.Sweep();
        undergraduate.Wash();
        undergraduate.BuyRice();
        //如果要有三个人就必须new三次
        Undergraduate undergraduateA = new Undergraduate();
        undergraduateA.Sweep();
        undergraduateA.Wash();
        undergraduateA.BuyRice();

        Undergraduate undergraduateB = new Undergraduate();
        undergraduateB.Sweep();
        undergraduateB.Wash();
        undergraduateB.BuyRice();

        //当然这些都是大学生--但是大学生终究会离开，但相应的志愿者并不会
    }
}
